package com.swt.service.impl.S_impl;

import com.swt.dao.S_dao.AboutCourseDao;
import com.swt.domain.Aboutcourse;
import com.swt.service.S_service.AboutCourseService;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service(value = "S_aboutCourseService")
@Transactional
public class AboutCourseServiceImpl implements AboutCourseService {
    /*注入dao*/
    @Resource(name = "S_aboutCourseDao")
    private AboutCourseDao aboutCourseDao;

    @Override
    public void save(Aboutcourse aboutcourse) {
        /*调用dao*/
        aboutCourseDao.save(aboutcourse);
    }

    @Override
    public List<Aboutcourse> select(DetachedCriteria detachedCriteria) {

        /*调用dao*/
        List<Aboutcourse> select = aboutCourseDao.select(detachedCriteria);
        return select;
    }

    @Override
    public void updatenum(Integer aboutcourseCourseid) {
        /*调用dao*/
        aboutCourseDao.updatenum(aboutcourseCourseid);
    }
}
